export const getQueryVariable = () => {
  const paramsStr = (location.href.split('?')[1] || '').split('#')[0]
  if (!paramsStr) return {};
  let params = {};
  paramsStr.split('&').map(str => {
    const [k, v] = str.split('=')
    params[k] = v
  })
  return params
}